#ifndef UTIL_H
#define UTIL_H


#include <string>
#include <vector>
//#include <SFML/Graphics.hpp>


template<typename T>
void Util_readLE(std::istream& inputStream, T* t)
{
	for (char* p = (char*) t; p < ((char*) t) + sizeof(T); p++)
	{
		inputStream.read(p, 1);	
	}
}

template<typename T>
void Util_readLE(std::istream& inputStream, std::vector<T>& v, int length)
{
	T t;
	for (int i = 0; i < length; i++)
	{
		Util_readLE(inputStream, &t);
		v.push_back(t);
	}
}

unsigned int Util_RGB(unsigned char r, unsigned char g, unsigned char b);

std::string Util_popNextToken(std::string& str, const std::string& delimiters);


#endif